<?php if($checkAdmin || $countVideos) : ?>
	<div class="u_cat">
		<div class="u_cat_head_strip"></div>
		<div class="u_cat_head"><a href="<?php echo Yii::app()->createUrl('video/indexGroup', array('group'=>$_GET['group']));?>"><em>Видеозаписи</em><span><?php echo CHtml::encode($countVideos); ?></span></a></div>
		<?php if($countVideos) : ?>
			<div class="u_cat_media video">
				<?php foreach ($videos as $key => $video){ ?>
					<?php $class = (!$key) ? 'u_media' : 'u_media hidden'; ?>
					<a href="<?php echo Yii::app()->createUrl('video/viewGroup', array('id'=>$video->id, 'profile'=>Yii::app()->request->getParam('group')));?>" class="<?php echo $class; ?>" id="video_<?php echo ($key+1);?>">
						<img src="<?php echo VideoPreview::getVideoPreview($video->video->code); ?>" width="180" height="107" border="0" alt="" />
						<div class="play"></div>
						<div class="mask"></div>					
					</a>
				<?php } ?>	
				<div class="u_media_nav">
					<div class="u_media_nav_prev"></div>
					<div class="u_media_nav_next"></div>
					<?php foreach ($videos as $key => $video){ ?>
						<?php $class = (!$key) ? 'u_media_nav_name' : 'u_media_nav_name hidden'; ?>
						<a href="<?php echo Yii::app()->createUrl('video/viewGroup', array('id'=>$video->id, 'profile'=>Yii::app()->request->getParam('group')));?>" class="<?php echo $class; ?>" id="video_<?php echo ($key+1);?>_"><?php echo CHtml::encode($video->name); ?></a>
					<?php } ?>
				</div>
			</div>
			<?php else : ?>
			<div class="">
				<div class="u_cont_list">
					<div class="u_cont">
						<div class="u_cont_r_empty">
							В сообществе ещё нет видеозаписей.
							<p><a href="<?php echo Yii::app()->createUrl('video/createGroup',array('group'=>$_GET['group']));?>" class="u_cont_h2_discussion ajaxLink">
								Добавить 
							</a></p>

						</div>
					</div>
				</div>
			</div>
		<?php endif; ?>
	</div>
<?php endif; ?>